﻿using Microsoft.Extensions.DependencyInjection;
using System;
using TianShu.AutoMapper;
using TianShu.Caching;
using TianShu.Data;
using TianShu.Domain;
using TianShu.Modularity;
using TianShu.SqlSugarCore.Services;
using TianShu.TenantManagement.Dal.Abstracts;
using TianShu.TenantManagement.Dal.AutoMapperConfig;

namespace TianShu.TenantManagement.Dal
{
    [DependsOn(
        typeof(TianShuTenantManagementDalAbstractsModule),
        typeof(TianShuDomainModule),
        typeof(AbpCachingModule),
        typeof(AbpAutoMapperModule),
        typeof(AbpDataModule)
        )]
    public class TianShuTenantManagementDalModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAutoMapperObjectMapper<TianShuTenantManagementDalModule>();

            Configure<AbpAutoMapperOptions>(options =>
            {
                options.AddProfile<TianShuTenantManagementDalMappingProfile>(validate: true);
            });


        }
    }
}
